# 在弹出框中输入内容
import time

from selenium import webdriver
import os
driver = webdriver.Chrome()
file = "file:///" + os.path.abspath("e:\比特课件\selenium2html/send.html")
driver.get(file)
driver.maximize_window()
driver.find_element_by_tag_name("input").click()
a = driver.switch_to.alert
a.send_keys("nihao")
time.sleep(3)
a.accept()
time.sleep(3)
driver.quit()